﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Schedule.aspx.cs" Inherits="MedicalCare.Admin.Schedule" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" />
<asp:Button ID="btnShowNewSchedule" runat="server" Text="创建新日程" 
        onclick="btnShowNewSchedule_Click" />
<table>
 <tr>
        <td>
        <asp:Calendar ID="CalendarSchedule" runat="server" UseAccessibleHeader="False" 
                onselectionchanged="CalendarSchedule_SelectionChanged" ></asp:Calendar>
        </td></tr>

    <tr>
        <td>
            <asp:DataList ID="ScheduleList" runat="server"  RepeatDirection="Horizontal"
                CellPadding="4" RepeatColumns="2" 
                onitemcommand="ScheduleList_ItemCommand" BackColor="White" 
                BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" 
                GridLines="Horizontal" onitemdatabound="ScheduleList_ItemDataBound" 
                ondatabinding="ScheduleList_DataBinding" 
                onselectedindexchanged="ScheduleList_SelectedIndexChanged"  >
                <FooterStyle BackColor="White" ForeColor="#333333" />
                <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
                <ItemStyle BackColor="White" ForeColor="#333333" />
                <ItemTemplate>
                    <table cellpadding="2" cellspacing="1" border="0">
                        <tr >
                            <td style="  width:150px;font-size:20px; font-weight:bold; vertical-align:middle; text-align:center;  ">
                                <asp:Label runat="server" id="lbScheduleId" Text= ' <%# DataBinder.Eval(Container.DataItem, "Id")%> ' Visible="false" />
                                <asp:Label runat="server" id="lbFamilyId" Text= ' <%# DataBinder.Eval(Container.DataItem, "FamilyId")%> ' Visible="false" />
                                <asp:Label runat="server" id="lbStartDT" Text= ' <%# DataBinder.Eval(Container.DataItem, "StartDT")%> ' Visible="false" />
                                <asp:Label runat="server" id="lbEndDT" Text= ' <%# DataBinder.Eval(Container.DataItem, "EndDT")%> ' Visible="false" />
                                <asp:Label runat="server" id="lbNurseId" Text= ' <%# DataBinder.Eval(Container.DataItem, "NurseId")%> ' Visible="false" />
                                <asp:Label runat="server" id="lbStatus" Text= ' <%# DataBinder.Eval(Container.DataItem, "Status")%> ' Visible="false" />
                               
                                <%# DataBinder.Eval(Container.DataItem, "FamilyName")%>
                            </td>
                            <td >
                                <table cellpadding="0" cellspacing="0" border="0" width="250px">
                                    <tr>
                                        <td >
                                            地点：<%# DataBinder.Eval(Container.DataItem, "Address")%></td>
                                        
                                    </tr>
                                    <tr>
                                        <td >
                                            时间：
                                            <asp:DropDownList ID="ddlStartTime" DataTextField="Description" DataValueField="Value"  runat="server"></asp:DropDownList>
                                             - 
                                            <asp:DropDownList ID="ddlEndTime" DataTextField="Description" DataValueField="Value"  runat="server"></asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td >
                                            护工：
                                            <asp:DropDownList ID="ddlNurse" DataTextField="Name" DataValueField="Id" runat="server"></asp:DropDownList></td>
                                    </tr>
                                    <tr>
                         <%--           <td style=" text-align:left">
                                        <asp:LinkButton ID="LinkButton1"  runat="server" CommandName="start"  
                                         Visible='<%# IsShow(DataBinder.Eval(Container.DataItem, "f_status").ToString()) %>'
                                         CommandArgument='<%# DataBinder.Eval(Container.DataItem, "f_id") %>'>开始</asp:LinkButton>
                                        &nbsp;&nbsp;&nbsp;
                                        <asp:LinkButton ID="LinkButton2" runat="server" CommandName="cancel"  
                                        Visible='<%# !IsShow(DataBinder.Eval(Container.DataItem, "f_status").ToString()) %>'
                                        CommandArgument='<%# DataBinder.Eval(Container.DataItem, "f_id") %>'>取消</asp:LinkButton>
                                
                                        </td>--%>
                                    </tr>
                                    </table>
                            </td>
                        </tr>
                        <%-- <tr>
                                    <td colspan="2" style=" text-align:left">
                                        <hr />
                                        </td>
                                    </tr>--%>
                    </table>
                </ItemTemplate>
                <SelectedItemStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
            </asp:DataList>           
        </td>
    </tr>
</table>

</asp:Content>
